<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.3.1.min.js"></script>
</head>
<body>
    <div id="d1">aaaa</div>
    <div class="d2">bbb</div>
    <p class="d2">ccc</p>
    <span>111</span>
    <div>
        <span>222</span>
    </div>

    <div>
        <p>
            <span>333</span>
        </p>
    </div>


    <script>
        $('#d1').css('background', 'pink')

        $('.d2').css('background', 'green').css('font-size', '30px') // 隐式迭代，链式写法

        $('div').css('color', 'red')

        // $('div span').css('background', 'blue')
        $('div>span').css('background', 'blue')

    </script>
</body>
</html>